#ifndef MOVESCUTHREAD_H
#define MOVESCUTHREAD_H

#include <QThread>
#include <QDate>
#include "../share/dicomscp.h"
#include "dcmtk/dcmnet/assoc.h"
#include "dcmtk/dcmnet/dimse.h"
class FindSCUCallback;
class DcmDataset;
class DcmFileFormat;

class MoveScuThread : public QThread
{
    Q_OBJECT
public:
    explicit MoveScuThread(QObject *parent = 0):QThread(parent){}

    void run();
    void setQRScp(const DicomScp &scp) { qrscp = scp; }
    void setStudyUids(const QStringList &studyUids) { studyUidList = studyUids; }
    void setPatientId(const QString &id) { patientId = id; }
    void setPatientName(const QString &name) { patientName = name; }
    void setAccNumber(const QString &accNum) { accNumber = accNum; }
    void setModality(const QString &modality) { this->modality = modality; }
    void setFromDateTime(const QDateTime &time) { fromTime = time; }
    void setToDateTime(const QDateTime &time) { toTime = time; }

signals:
    void progressMsg(const QString &msg);

public slots:

private:
    OFCondition moveSCU(T_ASC_Association * assoc, DcmDataset *keys);

    DicomScp qrscp;
    QStringList studyUidList;
    QString patientId;
    QString patientName;
    QString accNumber;
    QString modality;
    QDateTime fromTime;
    QDateTime toTime;
};

#endif // MOVESCUTHREAD_H
